Utilities to parse RSS feeds and make markdown stubs #301
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds utilities to create Markdown stubs from an RSS feed URL exposed through a CLI command like the other scripts for fetching data for the website.
The new CLI command is
fetch-rss-feed
and it takes an RSS feed URL and a directory to place the markdown stubs. Usage is:To support this work, this PR introduces two new dependencies:
feedparser
: a utility library for fetching and parsing RSS feeds -- this saves us from having to write quite a lot of fetching/parsing logic.unidecode
: I use this in a new utility function to easily slugify long title strings. I have a feeling this function will prove useful over time but right now it lets use create filenames from the RSS feeds titles for the Markdown stub files.click
: to add arguments and better interfaces to command line scriptsThe idea is for this to be just another script to run as a part of the websites automated data updating actions/PRs